class DisruptorAttachment extends BioAttachment
	placeable;

//var xEmitter MuzFlash3rd;
var xEmitter Flame;

replication
{
	unreliable if ( Role < ROLE_Authority )
		Flame;
}

simulated function PostBeginPlay ()
{
	Super.PostBeginPlay();
	PostNetBeginPlay();
}

simulated function PostNetBeginPlay ()
{
	Super.PostNetBeginPlay();
	SetTimer(0.20,True);
}

simulated function Destroyed()
{
	if ( MuzFlash3rd != None )
		MuzFlash3rd.Destroy();

	if ( Flame != None ){
		Flame.SoundVolume=0;
		Flame.Destroy();}

	Super.Destroyed();
}

simulated function Timer()
{
	if (MuzFlash3rd != None)
		MuzFlash3rd.LifeSpan += 0.06;
}

simulated event ThirdPersonEffects()
{
    local Rotator R;

    if ( Level.NetMode != NM_DedicatedServer && FlashCount > 0 )
    {
//        if (MuzFlash3rd == None && FiringMode == 0 )
//        {
//            MuzFlash3rd = Spawn(class'XEffects.BioMuzFlash1st');
//            MuzFlash3rd.bHidden = false;
//            AttachToBone(MuzFlash3rd, 'tip');
//        }
        if (MuzFlash3rd == None && FiringMode == 1 )
        {
            MuzFlash3rd = Spawn(class'DisruptorFlame3rd');
            MuzFlash3rd.bHidden = false;
            AttachToBone(MuzFlash3rd, 'tip');
        }
        if (MuzFlash3rd != None)
        {
            R.Roll = Rand(65536);
            SetBoneRotation('Bone_Flash', R, 0, 1.0);
            MuzFlash3rd.mStartParticles++;
        }
    }

    Super.ThirdPersonEffects();
}

defaultproperties
{
     bAltRapidFire=True
     Skins(0)=Combiner'TFMedia.Disruptor.DisruptorCombiner1'
     Skins(1)=Shader'TFMedia.Disruptor.DisruptorGreenShader'
}
